DEFINE VAR tax1 AS DECIMAL.
DEFINE VAR tax2 AS DECIMAL.

DEFINE BUFFER xmy FOR qaddb.ptp_det.
DEFINE BUFFER src FOR srcdb.ptp_det.

FOR EACH xmy WHERE xmy.ptp_part BEGINS "P" AND xmy.ptp_site = "410" EXCLUSIVE-LOCK:

    FIND FIRST src WHERE src.ptp_part = xmy.ptp_part AND src.ptp_site = "500" NO-LOCK NO-ERROR.

    IF (AVAILABLE src) THEN DO:
/*        tax1 = src.ptp__dec01. */
/*        tax2 = src.ptp__dec02. */

       ASSIGN xmy.ptp__dec01 = src.ptp__dec01
              xmy.ptp__dec02 = src.ptp__dec02
       NO-ERROR.
    END.

/*        ASSIGN xmy.ptp__dec01 = 0.10  */
/*               xmy.ptp__dec02 = 0.20  */
/*        NO-ERROR.                     */

/*     DISP xmy.ptp_part xmy.ptp__dec01 xmy.ptp__dec02  */
/*          src.ptp__dec01 WHEN (AVAILABLE src)         */
/*          src.ptp__dec02 WHEN (AVAILABLE src)         */
/*          WITH STREAM-IO.                             */
END.


/* FOR EACH ptp WHERE ptp.ptp_part BEGINS "P" AND ptp.ptp_site = "500" NO-LOCK: */
/*     DISP ptp.ptp_part ptp.ptp__dec01 ptp.ptp__dec02.                         */
/* END.                                                                         */

